package std::collection;

import std::Object;

public class Queue : Collection
{
	m_list->LinkedList;
	public Queue(){m_list=new LinkedList();}
	public push(e->Object){m_list.add(e);}
	public pop()->Object
	{
		if(m_list.empty())return null;
		else{
			temp->Object=m_list.get(0);
			m_list.remove(0);
			return temp;
		}
	}
	public top()->Object
	{
		if(m_list.empty())return null;
		else return m_list.get(0);
	}
	public exist(e->Object)->boolean{return m_list.exist(e);}
	public empty()->boolean{return m_list.empty();}
	public clear(){m_list.clear();}
	public size()->int{return m_list.size();}
}